<?php

namespace app\admin\model;

use think\Model;


class ProductionCoatingProcess extends Model
{

    

    

    // 表名
    protected $name = 'production_coating_process';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
        'roller_type_text'
    ];
    

    
    public function getRollerTypeList()
    {
        return ['网纹辊' => __('网纹辊'), '印刷辊' => __('印刷辊'), '无' => __('无')];
    }


    public function getRollerTypeTextAttr($value, $data)
    {
        $value = $value ? $value : (isset($data['roller_type']) ? $data['roller_type'] : '');
        $list = $this->getRollerTypeList();
        return isset($list[$value]) ? $list[$value] : '';
    }




}
